from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
from sqlalchemy import BIGINT, Column, String, ForeignKey
from sqlalchemy.orm import relationship


from web import Base



class Classify(Base):
    __tablename__ = 'classify'
    id = Column(BIGINT, primary_key=True,autoincrement= True)
    name =  Column(String(50))
    descs =  Column(String(250))
    # from web.model.Agent import Agent
    # agents = relationship(Agent, back_populates="classify")

class ClassifySchema(SQLAlchemyAutoSchema):
    class Meta:
        model = Classify
        load_instance = True

    # 主要用于响应Classify的json数据
classifySchema = ClassifySchema()

